<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>InFact: infact::Sheep Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">InFact
   
   </div>
   <div id="projectbrief">Interpreter and factory for easily creating C++ objects at run-time</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespaceinfact.html">infact</a>      </li>
      <li class="navelem"><a class="el" href="classinfact_1_1_sheep.html">Sheep</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">infact::Sheep Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<!-- doxytag: class="infact::Sheep" --><!-- doxytag: inherits="infact::Animal" -->
<p>A sheep.  
 <a href="classinfact_1_1_sheep.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="example_8h_source.html">example.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for infact::Sheep:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classinfact_1_1_sheep.png" usemap="#infact::Sheep_map" alt=""/>
  <map id="infact::Sheep_map" name="infact::Sheep_map">
<area href="classinfact_1_1_animal.html" title="A very simple class to represent an animal." alt="infact::Animal" shape="rect" coords="0,56,167,80"/>
<area href="classinfact_1_1_factory_constructible.html" title="An interface simply to make it easier to implement Factory-constructible types by implementing both r..." alt="infact::FactoryConstructible" shape="rect" coords="0,0,167,24"/>
</map>
 </div></div>

<p><a href="classinfact_1_1_sheep-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classinfact_1_1_sheep.html#a98ac95da1aff69c590b62ecc64fec605">Sheep</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a sheep.  <a href="#a98ac95da1aff69c590b62ecc64fec605"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classinfact_1_1_sheep.html#a85b9c2d8a9379078d29ec82e3ab4e328">~Sheep</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys a sheep.  <a href="#a85b9c2d8a9379078d29ec82e3ab4e328"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classinfact_1_1_sheep.html#a5fc9522fe9d8cb71ef61ddb732aff63f">RegisterInitializers</a> (<a class="el" href="classinfact_1_1_initializers.html">Initializers</a> &amp;initializers)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Registers one required and two optional inititalizers.  <a href="#a5fc9522fe9d8cb71ef61ddb732aff63f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classinfact_1_1_sheep.html#a69f798764ffea946753bd06e678407cf">PostInit</a> (const <a class="el" href="classinfact_1_1_environment.html">Environment</a> *env, const string &amp;init_str)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Grabs the variable named "age" from the <a class="el" href="classinfact_1_1_environment.html" title="An interface for an environment in which variables of various types are mapped to their values...">Environment</a> (set up by <a class="el" href="classinfact_1_1_sheep.html#a5fc9522fe9d8cb71ef61ddb732aff63f">RegisterInitializers</a>) and sets this sheep&rsquo;s age to be twice that value.  <a href="#a69f798764ffea946753bd06e678407cf"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual const string &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classinfact_1_1_sheep.html#a2fbf359eb99794a182fea7a7b1e00469">name</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classinfact_1_1_sheep.html#af6c829e8f5889e74769039a377a8f51b">age</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const vector&lt; int &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classinfact_1_1_sheep.html#a7311016b4dfbc9d6e63628bbbe574e1e">counts</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the counts of this sheep.  <a href="#a7311016b4dfbc9d6e63628bbbe574e1e"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>A sheep. </p>
<p>Unlike other animals, sheep are always twice the age you specify (for the purposes of this example, anyway). Please see how we do this by looking at the implementations of the <a class="el" href="classinfact_1_1_sheep.html#a5fc9522fe9d8cb71ef61ddb732aff63f">RegisterInitializers </a> and <a class="el" href="classinfact_1_1_sheep.html#a69f798764ffea946753bd06e678407cf">PostInit </a> methods. </p>

<p>Definition at line <a class="el" href="example_8h_source.html#l00207">207</a> of file <a class="el" href="example_8h_source.html">example.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a98ac95da1aff69c590b62ecc64fec605"></a><!-- doxytag: member="infact::Sheep::Sheep" ref="a98ac95da1aff69c590b62ecc64fec605" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classinfact_1_1_sheep.html#a98ac95da1aff69c590b62ecc64fec605">infact::Sheep::Sheep</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Constructs a sheep. </p>

<p>Definition at line <a class="el" href="example_8h_source.html#l00210">210</a> of file <a class="el" href="example_8h_source.html">example.h</a>.</p>

</div>
</div>
<a class="anchor" id="a85b9c2d8a9379078d29ec82e3ab4e328"></a><!-- doxytag: member="infact::Sheep::~Sheep" ref="a85b9c2d8a9379078d29ec82e3ab4e328" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classinfact_1_1_sheep.html#a85b9c2d8a9379078d29ec82e3ab4e328">infact::Sheep::~Sheep</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Destroys a sheep. </p>

<p>Definition at line <a class="el" href="example_8h_source.html#l00212">212</a> of file <a class="el" href="example_8h_source.html">example.h</a>.</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="af6c829e8f5889e74769039a377a8f51b"></a><!-- doxytag: member="infact::Sheep::age" ref="af6c829e8f5889e74769039a377a8f51b" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int <a class="el" href="classinfact_1_1_sheep.html#af6c829e8f5889e74769039a377a8f51b">infact::Sheep::age</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the age of this animal. </p>
 
<p>Implements <a class="el" href="classinfact_1_1_animal.html#a1819fb004f01e261bf4205fb0c8dd8f3">infact::Animal</a>.</p>

<p>Definition at line <a class="el" href="example_8h_source.html#l00241">241</a> of file <a class="el" href="example_8h_source.html">example.h</a>.</p>

</div>
</div>
<a class="anchor" id="a7311016b4dfbc9d6e63628bbbe574e1e"></a><!-- doxytag: member="infact::Sheep::counts" ref="a7311016b4dfbc9d6e63628bbbe574e1e" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const vector&lt;int&gt;&amp; <a class="el" href="classinfact_1_1_sheep.html#a7311016b4dfbc9d6e63628bbbe574e1e">infact::Sheep::counts</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the counts of this sheep. </p>

<p>Definition at line <a class="el" href="example_8h_source.html#l00245">245</a> of file <a class="el" href="example_8h_source.html">example.h</a>.</p>

</div>
</div>
<a class="anchor" id="a2fbf359eb99794a182fea7a7b1e00469"></a><!-- doxytag: member="infact::Sheep::name" ref="a2fbf359eb99794a182fea7a7b1e00469" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual const string&amp; <a class="el" href="classinfact_1_1_sheep.html#a2fbf359eb99794a182fea7a7b1e00469">infact::Sheep::name</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Returns the name of this animal. </p>
 
<p>Implements <a class="el" href="classinfact_1_1_animal.html#a4a4d3b54ae6ac6a7cafc1ea0406d0e91">infact::Animal</a>.</p>

<p>Definition at line <a class="el" href="example_8h_source.html#l00239">239</a> of file <a class="el" href="example_8h_source.html">example.h</a>.</p>

</div>
</div>
<a class="anchor" id="a69f798764ffea946753bd06e678407cf"></a><!-- doxytag: member="infact::Sheep::PostInit" ref="a69f798764ffea946753bd06e678407cf" args="(const Environment *env, const string &amp;init_str)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classinfact_1_1_sheep.html#a69f798764ffea946753bd06e678407cf">infact::Sheep::PostInit</a> </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classinfact_1_1_environment.html">Environment</a> *&#160;</td>
          <td class="paramname"><em>env</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const string &amp;&#160;</td>
          <td class="paramname"><em>init_str</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Grabs the variable named "age" from the <a class="el" href="classinfact_1_1_environment.html" title="An interface for an environment in which variables of various types are mapped to their values...">Environment</a> (set up by <a class="el" href="classinfact_1_1_sheep.html#a5fc9522fe9d8cb71ef61ddb732aff63f">RegisterInitializers</a>) and sets this sheep&rsquo;s age to be twice that value. </p>

<p>Reimplemented from <a class="el" href="classinfact_1_1_factory_constructible.html#abbcefaf8b2137f888ef133807cefe083">infact::FactoryConstructible</a>.</p>

<p>Definition at line <a class="el" href="example_8cc_source.html#l00059">59</a> of file <a class="el" href="example_8cc_source.html">example.cc</a>.</p>

</div>
</div>
<a class="anchor" id="a5fc9522fe9d8cb71ef61ddb732aff63f"></a><!-- doxytag: member="infact::Sheep::RegisterInitializers" ref="a5fc9522fe9d8cb71ef61ddb732aff63f" args="(Initializers &amp;initializers)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="classinfact_1_1_sheep.html#a5fc9522fe9d8cb71ef61ddb732aff63f">infact::Sheep::RegisterInitializers</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classinfact_1_1_initializers.html">Initializers</a> &amp;&#160;</td>
          <td class="paramname"><em>initializers</em></td><td>)</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Registers one required and two optional inititalizers. </p>
<p>Please note the use of a temporary variable being initialized in this method, for use inside the <a class="el" href="classinfact_1_1_sheep.html#a69f798764ffea946753bd06e678407cf">PostInit </a> method. </p>

<p>Reimplemented from <a class="el" href="classinfact_1_1_factory_constructible.html#a1c186ded6db298b7a84e5767e87c740f">infact::FactoryConstructible</a>.</p>

<p>Definition at line <a class="el" href="example_8h_source.html#l00218">218</a> of file <a class="el" href="example_8h_source.html">example.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>src/infact/<a class="el" href="example_8h_source.html">example.h</a></li>
<li>src/infact/<a class="el" href="example_8cc_source.html">example.cc</a></li>
</ul>
</div><!-- contents -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Wed Apr 23 2014 10:07:53 for InFact by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
